<!DOCTYPE html>
<html>
<head>
    <title>Math Object Random Example 1</title>
    <script type="text/javascript">
        var num = Math.floor(Math.random() * 10 + 1);
        alert(num);    //a number between 1 and 10
        
    </script>
</head>
<body>

</body>
</html>